using System;
using System.Web;
using System.Web.Routing;
using Dgg.Anug.Cqrs.Core.Infrastructure.Bootstrapping;

namespace Dgg.Anug.Cqrs.Web
{
	public class MvcApplication : HttpApplication
	{
		protected void Application_Start()
		{
			new ApplicationBootstrapper()
				.RegisterRoutes(RouteTable.Routes)
				.ConfigureIoC();
		}

		protected void Application_EndRequest()
		{
			new ApplicationTeardown().WhenEndingRequest(null, EventArgs.Empty);
		}
	}
}